package com.meilingcloud.activiti.controller;

import com.meilingcloud.activiti.service.IFormHistoryDataService;
import com.meilingcloud.common.core.domain.AjaxResult;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/historyFormData")
public class HistoryFormDataController {

    private final IFormHistoryDataService formHistoryDataService;

    /**
     * 审批详情
     */
    @GetMapping("/getForm/{businessKey}")
    public AjaxResult historyFormData(@PathVariable("businessKey") String businessKey) {
        return AjaxResult.success(formHistoryDataService.historyDataShow(businessKey));
    }

}
